package com.example.nkj.feather_android;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
//import android.view.Window;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by nkj on 18-11-4.
 */

public class welcome extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        //隐藏标题栏
        //方法1
        //requestWindowFeature(Window.FEATURE_NO_TITLE);
        //方法2
        if(getSupportActionBar() != null)
        {
            getSupportActionBar().hide();
        }
        setContentView(R.layout.welcome);

        Timer timer = new Timer();
        timer.schedule(new welcome.Task(),1500);

    }
    private class Task extends TimerTask
    {
        @Override
        public void run()
        {
            startActivity(new Intent(welcome.this,MainActivity.class));
            finish();
        }
    }
}
